
<?php echo $html->link(__('Edit'),array('action'=>"edit",$listingType['ListingType']['id']),array('class'=>'add_button'))?>
<?php echo $html->link(__("Change Field Groups orders"),array('action'=>"setOrders",$listingType['ListingType']['id']),array('class'=>'add_button'))?><br/><br/>
<div class="view_page">
<?php
	$html->addJUI(); 
	$listingFildsets = array();
	$reviewFieldsets = array();
	foreach($listingType['Fieldset'] as $fieldset)
	{
		if($fieldset['entity'] == Fieldset::TYPE_LISTING)
		{
			$listingFildsets['Listing'][] = $fieldset;
		}else
		{
			$listingFildsets['Review'][] = $fieldset;
		}
	}
?>
<?php foreach($listingFildsets as $label => $fieldsets ){?>
	
	<?php if(count($fieldsets)> 0){?>
		<h4><?php echo sprintf(__("%s Field Group"),$label);?></h4>
		<ul>
	 		<?php foreach($fieldsets as $fieldset){?>
	 			<li>
	 				<?php echo $html->link($fieldset['name'],array('controller'=>"custom_fields",'action'=>"index",'fieldset'=>$fieldset['id']));?>
	 			</li>
	 		<?php }?>
		</ul>

	<?php }?>
	
<?php }?>
<h4><?php echo __("Rateable Fields")?></h4>
<?php
foreach($listingType['RateableField'] as $rateableField)
{?>

	<ul>
		<li><b><?php echo __("Name")?>:</b> <?php echo $rateableField['name'];?></li>
		<li><b><?php echo __("Is required")?>:</b>
					<?php if($rateableField['is_required']==1)
							{
								echo __('Required');
							}else
							{
								echo __('Not required');
							}
							?></li>
		<li><b><?php echo __("Weight")?>:</b> <?php if(!empty($rateableField['weight']))
							{
								echo $rateableField['weight'];
							}else
							{
								echo __('N/A');
							}?></li>
		<li><b><?php echo __("Tooltip")?>:</b> <?php  if(!empty($rateableField['tooltip']))
							{
								echo $rateableField['tooltip'];
							}else
							{
								echo __('N/A');
							}?></li>
	</ul>
	<hr>	
	<?php 
}

?>
</div>